#include "Opencv.h"

Opencv::Opencv() 
{

}

Opencv::~Opencv() {
	
}

cv::Point2f Opencv::Opencv_getMaskCenter(MaskBase* base, cv::Mat& mat)
{   
    assert(base);
    return base->getMaskCenter(mat);
}

int Opencv::Opencv_preprocess(MaskBase* base, cv::Mat& mat, Attribute& attr)
{   
    assert(base);
    return base->preprocess(mat, attr);
}

void Opencv::Opencv_setMaskGrayToRGB(MaskBase* base, cv::Mat& mat)
{
    assert(base);
    return base->setMaskGrayToRGB(mat);
}

int Opencv::Opencv_findMaxOutline(MaskBase* base, cv::Mat& mat)
{   
    assert(base);
    return base->findMaxOutline(mat);
}

int Opencv::Opencv_findMaxOutline(MaskBase* base, cv::Mat& mat, Attribute& attr)
{   
    assert(base);
    return base->findMaxOutline(mat, attr);
}

int Opencv::Opencv_draw(MaskBase* base, cv::Mat& mat, Attribute& attr)
{   
    assert(base);
    return base->draw(mat, attr);
}

cv::Point2f Opencv::Opencv_getMaxOutlineCenter(MaskBase* base, Attribute& attr) const
{   
    assert(base);
    return base->getMaxOutlineCenter(attr);
}

int Opencv::Opencv_drawCross(MaskBase* base, cv::Mat& mat, cv::Point2f center, const size_t crosslen)
{   
    assert(base);
    return base->drawCross(mat, center, crosslen);
}

double Opencv::Opencv_CalculatePTOPDistance(MaskBase* base, cv::Point2f center1)
{   
    assert(base);
    return base->CalculatePTOPDistance(center1);
}

double Opencv::Opencv_CalculatePTOPDistance(MaskBase* base, cv::Point2f center1, cv::Point2f center2)
{   
    assert(base);
    return base->CalculatePTOPDistance(center1, center2);
}

bool Opencv::Opencv_isCover(MaskBase* base, double distance, const double threshold)
{   
    assert(base);
    return base->isCover(distance, threshold);
}

cv::Point2f* Opencv::Opencv_getTwoRoundholeCenter(MaskBase* base, cv::Mat& mat, Attribute& attr)
{   
    assert(base);
    return base->getTwoRoundholeCenter(mat, attr);
}
